package twentytwenty;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: Zahi
 * @Description:
 * @Date Created in 2020-12-15 11:32
 * @Modified By:
 */
public class FizzBuzz_412 {
    public static void main(String [] args){

    }

    public static List<String> fizzBuzz(int n){
        List<String> result = new ArrayList<>();
        for (int i = 1; i <= n; i++) {
            if (i % 3 == 0 && i % 5 == 0){
                result.add("FizzBuzz");
            }else if (i % 3 == 0){
                result.add("Fizz");
            }else if (i % 5 == 0){
                result.add("Buzz");
            }else {
                result.add(i + "");
            }
        }
        return result;
    }
}
